Skip to content

CLN: Remove redundant definitions in pandas.compat (filter, map, range, etc.) #25845

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 23, 2019

Conversation

jschendel
Copy link
Member

@jschendel jschendel commented Mar 23, 2019

Some more low hanging fruit in the Python 2 removal process. This should remove all references to the following functions in pandas.compat which are redundantly defined for Python 3:

  • filter
  • map
  • range
  • zip
  • next
  • FileNotFoundError
  • ResourceWarning

@jschendel jschendel added this to the 0.25.0 milestone Mar 23, 2019
assert iter_res == exp
assert list_res == exp

def test_range(self):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty much the only non-trivial change - edited some tests that would now just be testing the builtin range/map/filter/zip functions. Updated to just test the list equivalent functions, and slightly changed some variable names to better match other test conventions.

@codecov
Copy link

codecov bot commented Mar 23, 2019

Codecov Report

Merging #25845 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #25845      +/-   ##
==========================================
+ Coverage    91.3%   91.31%   +<.01%     
==========================================
  Files         173      173              
  Lines       53004    52974      -30     
==========================================
- Hits        48397    48374      -23     
+ Misses       4607     4600       -7
Flag Coverage Δ
#multiple 89.88% <100%> (ø) ⬆️
#single 41.75% <84.84%> (-0.02%) ⬇️
Impacted Files Coverage Δ
pandas/io/excel/_xlrd.py 93.93% <ø> (-0.1%) ⬇️
pandas/core/computation/align.py 97.82% <ø> (-0.03%) ⬇️
pandas/core/strings.py 98.59% <ø> (-0.01%) ⬇️
pandas/io/formats/style.py 96.68% <ø> (-0.01%) ⬇️
pandas/tseries/offsets.py 96.69% <ø> (-0.01%) ⬇️
pandas/io/date_converters.py 100% <ø> (ø) ⬆️
pandas/core/internals/managers.py 93.93% <ø> (-0.01%) ⬇️
pandas/core/internals/construction.py 95.9% <ø> (ø) ⬆️
pandas/core/internals/blocks.py 94.08% <ø> (-0.01%) ⬇️
pandas/core/indexing.py 90.87% <ø> (-0.01%) ⬇️
... and 39 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9e27f12...583841b. Read the comment docs.

@codecov
Copy link

codecov bot commented Mar 23, 2019

Codecov Report

Merging #25845 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #25845      +/-   ##
==========================================
+ Coverage    91.3%   91.31%   +<.01%     
==========================================
  Files         173      173              
  Lines       53004    52977      -27     
==========================================
- Hits        48397    48376      -21     
+ Misses       4607     4601       -6
Flag Coverage Δ
#multiple 89.88% <100%> (ø) ⬆️
#single 41.75% <84.37%> (-0.02%) ⬇️
Impacted Files Coverage Δ
pandas/io/excel/_xlrd.py 93.93% <ø> (-0.1%) ⬇️
pandas/core/computation/align.py 97.82% <ø> (-0.03%) ⬇️
pandas/core/strings.py 98.59% <ø> (-0.01%) ⬇️
pandas/io/formats/style.py 96.68% <ø> (-0.01%) ⬇️
pandas/util/testing.py 89.4% <ø> (ø) ⬆️
pandas/tseries/offsets.py 96.69% <ø> (-0.01%) ⬇️
pandas/io/date_converters.py 100% <ø> (ø) ⬆️
pandas/core/internals/managers.py 93.93% <ø> (-0.01%) ⬇️
pandas/core/internals/construction.py 95.9% <ø> (ø) ⬆️
pandas/core/internals/blocks.py 94.08% <ø> (-0.01%) ⬇️
... and 38 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9e27f12...8c3c1b2. Read the comment docs.

@jreback jreback merged commit 6e0f9a9 into pandas-dev:master Mar 23, 2019
@jreback
Copy link
Contributor

jreback commented Mar 23, 2019

thanks @jschendel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants